﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
namespace Things.Web.Farmer
{
    public partial class Show : Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    strid = Request.Params["id"];
                    Guid FarmerID = new Guid(strid);
                    ShowInfo(FarmerID);
                }
            }
        }

        private void ShowInfo(Guid FarmerID)
        {
            Things.BLL.Farmer bll = new Things.BLL.Farmer();
            Things.Model.Farmer model = bll.GetModel(FarmerID);
            this.lblFarmerID.Text = model.FarmerID.ToString();
            this.lblFarmerName.Text = model.FarmerName;
            this.lblSex.Text = model.Sex;
            this.lblAddress.Text = model.Address;
            this.lblTelPhone.Text = model.TelPhone;
            this.lblMobilePhone.Text = model.MobilePhone;
            this.lblIsDeleted.Text = model.IsDeleted ? "是" : "否";

        }

        protected void btnGoList_Click(object sender, EventArgs e)
        {
            Response.Redirect("list.aspx");
        }




    }
}
